package com.aj.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import com.aj.entity.User;
import com.aj.service.UserService;
import com.aj.util.Result;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aj
 * @since 2020-08-27
 */
@RestController
@CrossOrigin(origins="http://localhost:8008")
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	UserService us;
	
	@PostMapping("/login")
	public Result login(@RequestBody User u) {
		return us.login(u);
	}
	
}
